package com.hps.demo.msg;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author heps
 * @since 2020/7/23 10:05
 */
@Slf4j
@Component
@RocketMQMessageListener(topic = "${rocketmq.topic.order}", consumerGroup = "defaultConsumerGroup")
public class OrderTopicConsumer implements RocketMQListener<String> {

  @Override
  public void onMessage(String s) {
    log.info("receive msg: {}", s);
  }
}
